package prototype;

public class Main {
    public static void main(String[] args) {
        OrderFactory orderDealFactory = new OrderFactory();
        PersonOrder order = new PersonOrder();
        order.setOrderNumber(3500);
        order.setOrderName("个人订单");
        orderDealFactory.oldMakeType(order);


        CompanyOrder companyOrder = new CompanyOrder();
        companyOrder.setOrderNumber(2700);
        companyOrder.setOrderName("公司订单");
        orderDealFactory.newMakeType(companyOrder);

        order.setOrderNumber(5200);
        order.setOrderName("个人订单");
        orderDealFactory.newMakeType(order);
    }
}
